
<%@page import="com.hellodoctor.util.LConstants"%>
<%@page import="com.hellodoctor.slayer.model.Appointment"%>
<%@include file="/html/common/init.jsp"%>

<%@page import="com.liferay.portal.kernel.util.WebKeys"%>
<%@page import="com.liferay.portal.kernel.dao.search.ResultRow"%>

<%
ResultRow row = (ResultRow)
request.getAttribute(WebKeys.SEARCH_CONTAINER_RESULT_ROW);
Appointment appoint = (Appointment) row.getObject();
PortletURL changeStatusURL = renderResponse.createActionURL();
changeStatusURL.setParameter(ActionRequest.ACTION_NAME, "changeStatus");
changeStatusURL.setParameter("appointmentId", String.valueOf(appoint.getAppointmentId()));
changeStatusURL.setParameter("isMyPage","1");
%>

<liferay-ui:icon-menu direction="right">
	<c:if
		test="<%=appoint.getStatus() != LConstants.Appointment_Status_Attended%>">
		<%
			changeStatusURL.setParameter("status", String.valueOf(LConstants.Appointment_Status_Attended));
		%>
		<liferay-ui:icon image="check" message="Attended"
			url="<%=changeStatusURL.toString()%>" />
	</c:if>
	<c:if
		test="<%=appoint.getStatus() != LConstants.Appointment_Status_Absent%>">
		<%
			changeStatusURL.setParameter("status", String.valueOf(LConstants.Appointment_Status_Absent));
		%>
		<liferay-ui:icon image="remove" message="Absent"
			url="<%=changeStatusURL.toString()%>" />
	</c:if>
	<c:if
		test="<%=appoint.getStatus() != LConstants.Appointment_Status_CancelledByDoctor%>">
		<%
			changeStatusURL.setParameter("status",String.valueOf(LConstants.Appointment_Status_CancelledByDoctor));
		%>
		<liferay-ui:icon image="close" message="Cancel"
			url="<%=changeStatusURL.toString()%>" />
	</c:if>
</liferay-ui:icon-menu>